package com.passionfruit;

import com.passionfruit.web.listen.ApplicationReadyEventListener;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.ImportResource;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * Created by weirdor on 2017/10/25.
 */
@EnableAsync
@Configuration
@EnableScheduling
@SpringBootApplication
@EnableAspectJAutoProxy
@EnableAutoConfiguration
@EnableConfigurationProperties
@ImportResource(value = "classpath:spring/spring-bean.xml")
public class Web {

    public static void main(String[] args) {
        System.out.println("***************************************************************");
        System.out.println("启动web...");

        SpringApplication app = new SpringApplication(Web.class);

        app.addListeners(new ApplicationReadyEventListener());
        app.run(args);
    }

}